<template>
  <div class="box">
    <div class="header">
      <div class="verticalBar"></div>
      <span>
        <slot></slot>
      </span>
    </div>
    <div class="buttonBox">
      <button type="primary" @click="exit">退出</button>
    </div>
  </div>
</template>

<script>
import { defineComponent } from "vue";
export default defineComponent({
  name: "head",
});
// const exit = function () {
//   ElMessage.success({
//     message: '退出成功'
//   })
// }
</script>
<style scoped>
.box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 50px;
  background: linear-gradient(to right, gray 0%, rgb(222, 218, 218) 100%);
}
.header {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-left: 15px;
}
.verticalBar {
  width: 6px;
  height: 60%;
  background-color: #1e9fff;
  margin-right: 10px;
}
.buttonBox {
  width: 10%;
}
</style>
